﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _01HelloWoeld
{
    class LX
    {
        static void Main(string[] args)
        {
            #region //简单计算器
            /*
            String ID,Name,Tel,Gender;//定义变量
            Console.WriteLine("请输入客户信息：");
            Console.Write("编号：");
                 ID = Console.ReadLine();
             Console.Write("姓名：");
                 Name = Console.ReadLine();
             Console.Write("性别：");
                 Gender = Console.ReadLine();
             Console.Write("电话：");
                 Tel = Console.ReadLine();
            Console.WriteLine("客户信息：");
            Console.Write("性别:{0}\t电话:{1}",Gender,Tel);
                 Console.Read();
            */
            #endregion
            #region //数据类型占内存
            /*
            char c = '中';
            Console.WriteLine("char占{0}字节",sizeof(char));
            Console.WriteLine("char最大值是{0}",(int)char.MaxValue);
            Console.WriteLine(c)
            const double PI = 3.14159265f;//定义常量（不能再次赋值）
            */
            #endregion
            #region //if循环之上厕所
            /*
            char sex = '男';
            if (sex == '男')
            {
                Console.WriteLine('去男厕')；
            }
            else 
            {
                Console.WriteLine('去女厕');
            }
            */
            #endregion
            #region //if循环之VIP打5折不是不打折
            /*
            float price = 100;//商品价格
            bool VIP = false;//是否为VIP
            if (VIP == true) 
            {
                Console.WriteLine("价格为{0}",price * 0.5f);
            }
            else 
            {
                Console.WriteLine("价格为{0}", price);
            }
            */
            #endregion
            #region //选择语句
            /*
            float price = 100;//商品价格
            bool VIP = false;//是否为VIP
            string country = "中国";
            //如果是中国客户，还是VIP，打五折，否则打八折
            //如果是其他国家客户，是VIP，打七折，否则打9.8折
            if (country == "中国")
            {
                if (VIP == true) { Console.WriteLine("价格为{0}", price * 0.5f); }
                            else { Console.WriteLine("价格为{0}", price * 0.8f); }
            }
            else 
            {
                if (VIP == true) { Console.WriteLine("价格为{0}", price * 0.7f); }
                            else { Console.WriteLine("价格为{0}", price * 9.8f); }
            }
            */
            #endregion
            #region //一年中第几天
            /*
            Console.WriteLine("请输入年/月/日:");
            string str = Console.ReadLine();
            //拆分字符串
            char[] separtor = { '/' };
            string[] str.Split(separtor);
            int month = int.Parse(strArr[1]);//月
            int sum = 0;
            int year = int.Parse(strArr[0]);//年
            int day = int.Parse(strArr[2]);//日
            //Console.WriteLine(strArr[0]);
            //Console.WriteLine(strArr[1]);
            //Console.WriteLine(strArr[2]);
            switch (month) 
            {
                case 1:
                    sum = day;
                    break;
                case 2:
                    sum = 31 + 28;
                    break;
                case 3:
                    sum = 31 + 28 + 31;
                    break;
                default:
                     Console.WriteLine();

            }
            //判断闰年
            if (year % 400 == 0 || (year % 4 == 0 && year % 100 != 0))
            {
                sum += 1; 
                Console.WriteLine("是闰年");
            }
            //计算
            if (moth == 1)
                Console.WriteLine("这是一年的第{0}天".sum);
            */
            #endregion
        }
    }
}
